package edu.gatech.fiveminutesleft.model;

/**
 * An information holder interface for accounts.
 * 
 * @author Andrey
 */
public interface Account {

	public AccountLists getLists();

	/**
	 * Returns the user's real name
	 * 
	 * @return
	 */
	public String getRealName();

	/**
	 * Sets the user's real name
	 * 
	 * @param name
	 */
	public void setRealName(String name);

	/**
	 * Getter for the account username.
	 * 
	 * @return username
	 */
	public String getUsername();

	/**
	 * @param password
	 *            Password attempt
	 * @return True if the given password is the password for this account.
	 */
	public boolean isPassword(String password);

	/**
	 * Getter for the email of the account
	 * 
	 * @return the email
	 */
	public String getEmail();

	/**
	 * Sets the user's email
	 * 
	 * @param email
	 */
	public String setEmail(String email);

	/**
	 * Changes the stored password for this account to the hashed value of the provided password
	 * 
	 * @param newPassword
	 *            the new unhashed password for this account
	 * @return null on success, error code otherwise
	 */
	public String setPassword(String newPassword);

	/**
	 * Add a non-specific configuration with the type being the key and the set option the
	 * associated value
	 * 
	 * @param key
	 *            the name of the setting or
	 * @param value
	 *            value to correspond to key
	 * @return null on success, error code otherwise
	 */
	public String addSetting(String key, String value);

	/**
	 * Gets a named setting from the settings of this task
	 * 
	 * @param key
	 *            the name of the setting
	 * @return the setting
	 */
	public String getSetting(String key);
}
